﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wp.DAL;
using Wp.BLL;

public partial class Modules_Photos_Controls_DetailAlbum : System.Web.UI.UserControl
{
    public string AlbumTextId { get; set; }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["albumtextid"] != null)
        {
            AlbumTextId = Request["albumtextid"];
        }
        else AlbumTextId = "";
        if (!IsPostBack)
        {
            LoadData();
        }
    }
    void LoadData()
    {
        List<TblPhotoEntity> ls = TblPhotoManager.CreateInstant().SelectTblPhotoByAlbumTextId(AlbumTextId);
        rpt.DataSource = ls;
        rpt.DataBind();

        List<TblAlbumEntity> ls1 = TblAlbumManager.CreateInstant().SelectAll();
        rpt2.DataSource = ls1;
        rpt2.DataBind();
    }
}